Skip to content

AsyncSubject class

Defined in

Namespace: System.Reactive.Subjects Assembly: System.Reactive.dll Full name: System.Reactive.Subjects.AsyncSubject<T> Modifiers: public sealed

Summary

        Represents the result of an asynchronous operation.
        The last value before the OnCompleted notification, or the error received through OnError, is sent to all subscribed observers.
        

Applies to

netstandard2.0

Class hierarchy
classDiagram
class AsyncSubject~T~
class SubjectBase~T~
SubjectBase~T~ <|-- AsyncSubject~T~
class INotifyCompletion {
    <>
}
INotifyCompletion <|.. AsyncSubject~T~

Inherits from: SubjectBase

Implements: INotifyCompletion

Constructors

NameSummary
.ctorCreates a subject that can only receive one value and that value is cached for all future observations.

Properties

NameSummary
HasObserversIndicates whether the subject has observers subscribed to it.
IsDisposedIndicates whether the subject has been disposed.
IsCompletedGets whether the AsyncSubject has completed.

Methods

NameSummary
OnCompletedNotifies all subscribed observers about the end of the sequence, also causing the last received value to be sent out (if any).
OnErrorNotifies all subscribed observers about the exception.
OnNextSends a value to the subject. The last value received before successful termination will be sent to all subscribed and future observers.
SubscribeSubscribes an observer to the subject.
DisposeUnsubscribe all observers and release resources.
GetAwaiterGets an awaitable object for the current AsyncSubject.
GetResultGets the last element of the subject, potentially blocking until the subject completes successfully or exceptionally.
Inherited members